package com.vcc.core.util;

import cn.idev.excel.ExcelWriter;
import cn.idev.excel.FastExcel;
import cn.idev.excel.write.metadata.WriteSheet;
import com.vcc.core.derive.admin.DeriveUser;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;

public class Test {


    public static List<DeriveUser> generateRandomUsers(int count) {
        List<DeriveUser> users = new ArrayList<>();
        Random random = new Random();

        for (int i = 0; i < count; i++) {

        }
        return users;
    }


    public static void main(String[] args) {
        // 写入Excel
        String fileName = "complex_export.xlsx";
        ExcelWriter excelWriter = ExportUtil.createExcelWriter(fileName);
        WriteSheet writeSheet = ExportUtil.createWriteSheet("用户数据", DeriveUser.class);
        for (int i = 0; i < 3; i++) {
            List<DeriveUser> users = generateRandomUsers(10);
            ExportUtil.writeData(excelWriter, writeSheet, users);
        }
        ExportUtil.closeExcelWriter(excelWriter);

        System.out.println("Excel文件已生成: " + fileName);
    }
}
